package com.caiyouxi.finance.controller;

import com.caiyouxi.common.bean.ResData;
import com.caiyouxi.finance.model.CouponBatch;
import com.caiyouxi.finance.service.CouponBatchServices;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/boss/coupon_batch")
public class CouponBatchController {
    @Autowired
    private CouponBatchServices services;

    //查询单条记录
    @RequestMapping("select_coupon_batch")
    public ResData select_coupon_batch(@RequestBody CouponBatch bean){
           return services.select_coupon_batch(bean);
    }

    //添加
    @RequestMapping("add_coupon_batch")
    public ResData add_coupon_batch(@RequestBody CouponBatch bean){
        return services.add_coupon_batch(bean);
    }

    //更新
    @RequestMapping("update_coupon_batch")
    public ResData update_coupon_batch(@RequestBody CouponBatch bean){
        return services.update_coupon_batch(bean);
    }

    //删除
    @RequestMapping("delete_coupon_batch")
    public ResData delete_coupon_batch(@RequestBody CouponBatch bean){
        return services.delete_coupon_batch(bean);
    }

    //查询所有
    @RequestMapping("coupon_batch_list")
    public ResData coupon_batch_list(@RequestBody CouponBatch bean){
        return services.coupon_batch_list(bean);
    }
}
